Parsing with zippers (functional pearl)
نویسندگان
چکیده
منابع مشابه
Functional Pearl: Scrap Your Zippers
The “zipper” data type provides the ability for editing tree shaped data in a pure functional setting and has found many uses and applications. However the traditional zipper has two major limitations. First, requires a significant amount of boilerplate code to implement. Second, it can only operate on homogeneous data types. Data structures where there are multiple node types are beyond the ra...
متن کاملFUNCTIONAL PEARL Parsing Permutation Phrases
A permutation phrase is a sequence of elements (possibly of different types) in which each element occurs exactly once and the order is irrelevant. Some of the permutable elements may be optional. We show a way to extend a parser combinator library with support for parsing such free-order constructs. A user of the library can easily write parsers for permutation phrases and does not need to car...
متن کاملFunctional Pearl: Replaying the stack for parsing and pretty printing
Modulo inessential details, parsers and pretty printers, to and from algebraic datatypes, offer an uncanny resemblance and yet are all too often defined separately, in gross violation of the “don’t repeat yourself” principle. We present a family of reversible parser/printer combinators that allows one to define both at once in a type-safe manner, compositionally and without any need for a prepr...
متن کاملParsing the Voyager Domain Using Pearl
This paper* describes a .al, ural language p~rsi.g algorithm &)r unresu'icl,ed I,ext which uses a probabilhq-hased scoring funct,iow I,o sele(:l, I,he "besC: parse of ~/ sent,enos acc:ording t,c~ a given gra0nunar. The parser~ "Pearl~ ix a i,hne-asynciironous t)ol,l,orn-u 1) chart, parser with Earley-l,ype I,Ol)-dowil t)redic:l,ion which pursues I,he }6gtmsl,-s(:ori.g t,heory in I,he (:|larl,, ...
متن کاملFUNCTIONAL PEARL InvertingtheBurrowsWheelertransform
The objective of this pearl is to derive the inverse of the Burrows-Wheeler transform from its specification, using simple equational reasoning. In fact, we derive the inverse of a more general version of the transform, proposed by Schindler.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Proceedings of the ACM on Programming Languages
سال: 2020
ISSN: 2475-1421
DOI: 10.1145/3408990